/**
 * 
 */
package org.apache.asyncweb.server.rest;

import org.apache.asyncweb.common.HttpHeaderConstants;
import org.apache.asyncweb.common.HttpRequest;
import org.apache.asyncweb.server.HttpService;
import org.apache.asyncweb.server.HttpServiceContext;

/**
 * @author 何小锋
 * 
 */
public class RestfulService implements HttpService {

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.apache.asyncweb.server.HttpService#handleRequest(org.apache.asyncweb
	 * .server.HttpServiceContext)
	 */
	public void handleRequest(HttpServiceContext context) throws Exception {
		HttpRequest request = context.getRequest();
		String accept = request.getHeader(HttpHeaderConstants.KEY_ACCEPT);
		String contentType = request.getContentType();
		System.out.println(accept);
		System.out.println(contentType);
		System.out.println(request.getMethod());
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.apache.asyncweb.server.HttpService#start()
	 */
	public void start() {

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.apache.asyncweb.server.HttpService#stop()
	 */
	public void stop() {

	}

}
